<!--
 * @Descripttion: 
 * @version: 1.0.0
 * @Author: 孙立政
 * @Date: 2021-12-16 17:41:36
 * @LastEditors: 孙立政
 * @LastEditTime: 2021-12-16 18:08:14
-->
<template>
  <div class="classify">
    <ul class="classify-1">
      <li v-for="item in classIfyList1" :key="item.id">
        <div>
          <img :src="item.url" alt="" />
        </div>
        <div>{{ item.name }}</div>
      </li>
    </ul>
    <ul class="classify-2">
      <li v-for="item in classIfyList2" :key="item.id">
        <div>
          <img :src="item.url" alt="" />
        </div>
        <div>{{ item.name }}</div>
      </li>
    </ul>
  </div>
</template>

<script setup lang="ts">
import { onMounted } from 'vue'
interface list {
  id: number
  url: string
  name: string
}

const classIfyList1: list[] = [
  {
    id: 0,
    name: '外卖',
    url: 'https://diandi-app.oss-cn-hangzhou.aliyuncs.com/appV3/home/sc/classify/1.png',
  },
  {
    id: 1,
    name: '美食',
    url: 'https://diandi-app.oss-cn-hangzhou.aliyuncs.com/appV3/home/sc/classify/2.png',
  },
  {
    id: 2,
    name: '菜市场',
    url: 'https://diandi-app.oss-cn-hangzhou.aliyuncs.com/appV3/home/sc/classify/3.png',
  },
  {
    id: 3,
    name: '酒店',
    url: 'https://diandi-app.oss-cn-hangzhou.aliyuncs.com/appV3/home/sc/classify/4.png',
  },
  {
    id: 4,
    name: '疗休养',
    url: 'https://diandi-app.oss-cn-hangzhou.aliyuncs.com/appV3/home/sc/classify/5.png',
  },
]
const classIfyList2: list[] = [
  {
    id: 0,
    name: '严选',
    url: 'https://diandi-app.oss-cn-hangzhou.aliyuncs.com/appV3/home/sc/classify/1-1.png',
  },
  {
    id: 1,
    name: '超市',
    url: 'https://diandi-app.oss-cn-hangzhou.aliyuncs.com/appV3/home/sc/classify/1-2.png',
  },
  {
    id: 2,
    name: '生活馆',
    url: 'https://diandi-app.oss-cn-hangzhou.aliyuncs.com/appV3/home/sc/classify/1-3.png',
  },
  {
    id: 3,
    name: '丽人休闲',
    url: 'https://diandi-app.oss-cn-hangzhou.aliyuncs.com/appV3/home/sc/classify/1-4.png',
  },
  {
    id: 4,
    name: '本地服务',
    url: 'https://diandi-app.oss-cn-hangzhou.aliyuncs.com/appV3/home/sc/classify/1-5.png',
  },
]
</script>

<style lang="scss" scoped>
.classify {
  width: 710px;
  height: 328px;
  background-color: #fff;
  border-radius: 24px;
  margin: 0 auto;
  margin-top: 20px;
  font-size: 25px;
  color: #333333;
  overflow: hidden;
  ul {
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    li {
      width: 20%;
      text-align: center;
    }
  }

  .classify-1 {
    margin-top: 35px;
    img {
      width: 88px;
      height: 88px;
    }
  }
  .classify-2 {
    margin-top: 32px;
    img {
      width: 50px;
      height: 50px;
    }
  }
}
</style>
